package org.concepts.java.generics;

/**
 * Car repair takes a class and provides services to repair it. This class uses
 * generics unlike {@link CarRepair}. See the benefits in {@link TestCarRepair}
 * 
 * @author vvvv
 * 
 */
public class CarRepairGenerics<T extends Car> {

  private T car = null;
  
  public CarRepairGenerics(T car) {
    this.car = car;
  }

  public void changeOil() {
    System.out.println("Changing Oil of Car [" + car + "]");
    car.start();
    car.stop();
    System.out.println("Changing oil DONE :-)");
  }

  public T getCar() {
    return this.car;
  }

}
